package logic

import (
	"context"
	"furni-suite/model"

	"furni-suite/furnirpc/furnirpc"
	"furni-suite/furnirpc/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type FurniShowLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewFurniShowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FurniShowLogic {
	return &FurniShowLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 详情
func (l *FurniShowLogic) FurniShow(in *furnirpc.FurniShowRequest) (*furnirpc.FurniShowResponse, error) {
	// todo: add your logic here and delete this line
	var list []*furnirpc.FurniShow
	list = model.FindFurniById(model.DB, int(in.FurniId))
	return &furnirpc.FurniShowResponse{
		List: list,
	}, nil
}
